$(function(){
	var objectSouW={};
			var objectFouW={};
				var url="getAllInformationPort.do";//渠道地址
		    	var data={};
		    	data=YuXi.util.getAsynCache(url,"null",function(data){
		    		objectFouW=data.object;
		    	},function(){});//请求数据
				var url="getAllInfomationSource.do";//渠道地址
		    	var data={};
		    	data=YuXi.util.getAsynCache(url,"null",function(data){
		    		objectSouW=data.object;
		    	},function(){});//请求数据

	var modifyInfoRecord={};
	var isRed=0;
	var index=0;
	var allModifyInfoRecord={};
	var browseRecord={};
	var detailId=queryString('detailId');//取得？后的值
	var detailTime="";
	//获取信息修改记录
	allModifyRecord(detailId);
//	getInfoRecord(detailId);
	getInformationFlow(detailId);
	//请求信息详细数据
	requestDetail(detailId);//请求数据
	$("#flowbtn").click(function(){
		$("#flowmodel").modal("show");
	});
	$(document).on('click','.modifyDetailInfo',function(){
		var recordId = $(this).attr("data-id");
		var time=$(this).attr("data-time");
		var infoId=detailId;
		var newInfoRecordId=0;
		var num=$(this).attr("data-num")*1+1;
		if(num<modifyInfoRecord.length){
			for(;num<modifyInfoRecord.length;num++){
				if(modifyInfoRecord[num].doType==5){
					newInfoRecordId=modifyInfoRecord[num].id;
					break;
				}
			}
		}
		getInfoDetailByModifyRecord(recordId,infoId,time,newInfoRecordId);
	});
	$("#letgoback").click(function(){
		  window.history.back();
	});
	//请求详细的修改之信息数据
	function getInfoDetailByModifyRecord(recordId,infoId,time,newInfoRecordId){
		
//		getDetailModifyRecord
		var url="getDetailModifyRecord.do";//向后台请求数据id
		var modifyRecordDetail;
		var modifyInfoDetail;
		YuXi.util.post(url,{recordId:recordId,infoId:infoId,newrecordId:newInfoRecordId},function(data){
			if(data.status){
				modifyRecordDetail=data.object[0];
				if(data.object.length==1){
					if($.trim($(".reSearchSource").text())!=$.trim(modifyRecordDetail.informationSourceNames)){
						$(".modifySource").show();
						var html=time+"修改信息渠道:";
						$(".modifySource label").html("");
						$(".modifySource span").html("");
						$(".modifySource label").append(html);
						$(".modifySource span").append("从"+modifyRecordDetail.informationSourceNames+"修改为"+$.trim($(".reSearchSource").text()));
						
					}
					if($.trim($(".sele").text())!=$.trim(modifyRecordDetail.safetyPortNames)){
						$(".modifyPort").show();
						var html=time+"修改安全分口:";
						$(".modifyPort label").html("");
						$(".modifyPort span").html("");
						$(".modifyPort label").append(html);
						$(".modifyPort span").append("从"+modifyRecordDetail.safetyPortNames+"修改为"+$.trim($(".sele").text()));
						
					}
					if($.trim($(".pes").text())!=$.trim(modifyRecordDetail.informationClassificationNames)){
						$(".modifyPes").show();
						var html=time+"修改重要分级:";
						$(".modifyPes label").html("");
						$(".modifyPes span").html("");
						$(".modifyPes label").append(html);
						$(".modifyPes span").append("从"+modifyRecordDetail.informationClassificationNames+"修改为"+$.trim($(".pes").text()));
						
					}
					if($.trim($(".sort1").text())!=$.trim(modifyRecordDetail.informationSortNames)){
						$(".modifySort").show();
						var html=time+"修改分类:";
						$(".modifySort label").html("");
						$(".modifySort span").html("");
						$(".modifySort label").append(html);
						$(".modifySort span").append("从"+modifyRecordDetail.informationSortNames+"修改为"+$(".sort1").text());
						
					}
					if($.trim($(".label1").text())!=$.trim(modifyRecordDetail.inputPerSonNames)){
						$(".modifyPerson").show();
						var html=time+"修改参与人:";
						$(".modifyPerson label").html("");
						$(".modifyPerson span").html("");
						$(".modifyPerson label").append(html);
						$(".modifyPerson span").append("从"+modifyRecordDetail.inputPerSonNames+"修改为"+$(".label1").text());
						
					}
					
					if($.trim($("#valProfile").text())!=$.trim(modifyRecordDetail.informationProfile)){
						$(".modifyProfile").show();
						var html=time+"修改信息简介:";
						$(".modifyProfile label").html("");
						$(".modifyProfile p").html("");
						$(".modifyProfile label").append(html);
						$(".modifyProfile p").append("从"+modifyRecordDetail.informationProfile+"修改为"+$("#valProfile").text());
						
					}
					if($.trim($("#valContent").text())!=$.trim(modifyRecordDetail.informationConternt)){
						$(".modifyContent").show();
						var html=time+"修改信息内容:";
						$(".modifyContent label").html("");
						$(".modifyContent p").html("");
						$(".modifyContent label").append(html);
						$(".modifyContent p").append("从"+modifyRecordDetail.informationConternt+"修改为"+$("#valContent").text());
						
					}
					if($.trim($("#valMeasure").text())!=$.trim(modifyRecordDetail.mesure)){
						$(".modifyMeasure").show();
						var html=time+"修改信息措施:";
						$(".modifyMeasure label").html("");
						$(".modifyMeasure p").html("");
						$(".modifyMeasure label").append(html);
						$(".modifyMeasure p").append("从"+modifyRecordDetail.mesure+"修改为"+$("#valMeasure").text());
						
					}
				}else{
					modifyInfoDetail=data.object[1];
					if($.trim(modifyInfoDetail.informationSourceNames)!=$.trim(modifyRecordDetail.informationSourceNames)){
						$(".modifySource").show();
						var html=time+"修改信息渠道:";
						$(".modifySource label").html("");
						$(".modifySource span").html("");
						$(".modifySource label").append(html);
						$(".modifySource span").append("从"+modifyRecordDetail.informationSourceNames+"修改为"+modifyInfoDetail.informationSourceNames);
						
					}
					if($.trim(modifyInfoDetail.safetyPortNames)!=$.trim(modifyRecordDetail.safetyPortNames)){
						$(".modifyPort").show();
						var html=time+"修改安全分口:";
						$(".modifyPort label").html("");
						$(".modifyPort span").html("");
						$(".modifyPort label").append(html);
						$(".modifyPort span").append("从"+modifyRecordDetail.safetyPortNames+"修改为"+modifyInfoDetail.safetyPortNames);
						
					}
					if($.trim(modifyInfoDetail.informationClassificationNames)!=$.trim(modifyRecordDetail.informationClassificationNames)){
						$(".modifyPes").show();
						var html=time+"修改重要分级:";
						$(".modifyPes label").html("");
						$(".modifyPes span").html("");
						$(".modifyPes label").append(html);
						$(".modifyPes span").append("从"+modifyRecordDetail.informationClassificationNames+"修改为"+modifyInfoDetail.informationClassificationNames);
						
					}
					if($.trim(modifyInfoDetail.informationSortNames)!=$.trim(modifyRecordDetail.informationSortNames)){
						$(".modifySort").show();
						var html=time+"修改分类:";
						$(".modifySort label").html("");
						$(".modifySort span").html("");
						$(".modifySort label").append(html);
						$(".modifySort span").append("从"+modifyRecordDetail.informationSortNames+"修改为"+modifyInfoDetail.informationSortNames);
						
					}
					if($.trim(modifyInfoDetail.inputPerSonNames)!=$.trim(modifyRecordDetail.inputPerSonNames)){
						$(".modifyPerson").show();
						var html=time+"修改参与人:";
						$(".modifyPerson label").html("");
						$(".modifyPerson span").html("");
						$(".modifyPerson label").append(html);
						$(".modifyPerson span").append("从"+modifyRecordDetail.inputPerSonNames+"修改为"+modifyInfoDetail.inputPerSonNames);
						
					}
					
					if($.trim(modifyInfoDetail.informationProfile)!=$.trim(modifyRecordDetail.informationProfile)){
						$(".modifyProfile").show();
						var html=time+"修改信息简介:";
						$(".modifyProfile label").html("");
						$(".modifyProfile p").html("");
						$(".modifyProfile label").append(html);
						$(".modifyProfile p").append("从"+modifyRecordDetail.informationProfile+"修改为"+modifyInfoDetail.informationProfile);
						
					}
					if($.trim(modifyInfoDetail.informationConternt)!=$.trim(modifyRecordDetail.informationConternt)){
						$(".modifyContent").show();
						var html=time+"修改信息内容:";
						$(".modifyContent label").html("");
						$(".modifyContent p").html("");
						$(".modifyContent label").append(html);
						$(".modifyContent p").append("从"+modifyRecordDetail.informationConternt+"修改为"+modifyInfoDetail.informationConternt);
						
					}
					if($.trim(modifyInfoDetail.mesure)!=$.trim(modifyRecordDetail.mesure)){
						$(".modifyMeasure").show();
						var html=time+"修改信息措施:";
						$(".modifyMeasure label").html("");
						$(".modifyMeasure p").html("");
						$(".modifyMeasure label").append(html);
						$(".modifyMeasure p").append("从"+modifyRecordDetail.mesure+"修改为"+modifyInfoDetail.mesure);
						
					}
				}
				
				
			}
		},function(){
			
		});
	}
	$(document).on('click','#moreModifyRecord',function(){
		index=0;
		if($(this).text()=="查看更多"){
			$("#moreModifyRecord").text("收起");
			index=0;
			for(var j=0;j<4;j++){
				if(modifyInfoRecord[j].doType==5){
					index++;
				}
			}
			for(var i=4;i<modifyInfoRecord.length;i++){
				var date =(modifyInfoRecord[i].time)*1;
				date=new Date(date);
				var year =date.getFullYear();
				var month=date.getMonth()+1;
				var day=date.getDate();
				var hours=date.getHours();
				var minure=date.getMinutes();
				var detailtime=year+"年"+month+"月"+day+"日"+hours+"时"+minure+"分";
				if(modifyInfoRecord[i].doType==5){
					modifyIsRed(index);
					if(isRed==1){
						var html='<li style="color:red;" class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>'
						$("#moreModifyRecord").before(html);
					}else{
						var html='<li class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>'
						$("#moreModifyRecord").before(html);	
					}
					
					index++;
				}else{
					var html='<li class="list-group-item"  >'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>';
					$("#moreModifyRecord").before(html);
				}
				
				
			}
		}else{
			index=0;
			$(".modifyRecord").html("");
			for(var i=0;i<4;i++){
				var date =(modifyInfoRecord[i].time)*1;
				date=new Date(date);
				var year =date.getFullYear();
				var month=date.getMonth()+1;
				var day=date.getDate();
				var hours=date.getHours();
				var minure=date.getMinutes();
				var detailtime=year+"年"+month+"月"+day+"日"+hours+"时"+minure+"分";
				if(modifyInfoRecord[i].doType==5){
					modifyIsRed(index);
					if(isRed==1){
						var html='<li style="color:red;" class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>'
						$(".modifyRecord"). append(html);
					}else{
						var html='<li class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>'
						$(".modifyRecord"). append(html);	
					}
					index++;
				}else{
					var html='<li class="list-group-item">'+month+"月"+day+"日"+hours+"时"+" "+modifyInfoRecord[i].name+modifyInfoRecord[i].doRemark+'</li>';
					$(".modifyRecord").append(html);
				}
				
			}
			$(".modifyRecord"). append('<li class="list-group-item text-center"  style="padding:4px 15px;color:#347AB7;" id="moreModifyRecord">查看更多</li>');
		}
		
	});
	$(document).on('click','#moreBrowseRecord',function(){
		if($(this).text()=="查看更多"){
			$("#moreBrowseRecord").text("收起");
			for(var i=4;i<12;i++){
				var time = YuXi.getTime.get(browseRecord[i].browseTime);
				var html='<li class="list-group-item">'+time+" "+browseRecord[i].userName+'浏览了点评记录</li>';
				$("#moreBrowseRecord").before(html);
				
			}
		}else{
			$(".CommentRecordBrowse").html("");
			for(var i=0;i<4;i++){
				var time = YuXi.getTime.get(browseRecord[i].browseTime);
				var html='<li class="list-group-item">'+time+" "+browseRecord[i].userName+'浏览了点评记录</li>';
				$(".CommentRecordBrowse").append(html);
			}
			$(".CommentRecordBrowse"). append('<li class="list-group-item text-center"  style="padding:4px 15px;color:#347AB7;" id="moreBrowseRecord">查看更多</li>');
		}
		
	});
//正则取链接传来的数据
function queryString(key)
{
    var regex_str = "^.+\\?.*?\\b"+ key +"=(.*?)(?:(?=&)|$|#)";
    var regex = new RegExp(regex_str,"i");
    var url = window.location.toString();
    if(regex.test(url)) return RegExp.$1;
    return undefined;
}
		
	
//根据id向后台请求数据详情
function requestDetail(id)
{
	var url="getUserInformationById.do";//向后台请求数据id
	var object={}
	var soure=[];
	var personName=[];
	var dataid={informationId:id};
	YuXi.util.get(url,dataid,function(data){
		object=data.object;
		

		var pname=object.inputPerSonNames;
		
		pname=pname.substr(1);
		pname=pname.substring(0,pname.length-1);
		personName=pname;
		
		$(".label1").append(personName);
		$(".infoBelong").html(object.prisonName);
//----------------------------------------------------------------------

			
			object.informationSourceID=object.informationSourceID.substring(1,object.informationSourceID.length-2);
			var array=object.informationSourceID.split(",");
			var title=YuXi.detailWri.post(objectFouW,object.safetyPortId);
			title=title+object.safetyPortNames;
			var tota="";
			for(var so=0;so<array.length;so++)
			{
                               
				tota=tota+YuXi.detailWri.get(objectSouW,array[so])+",";
				
				if(so==array.length-1){
					tota=tota.substring(0,tota.length-1);
				    $(".reSearchSource ").append(tota);
				}
			}
		
			
//-------------------------------------------------------------------------
		addOption(".sele",title);
		addOption(".pes",object.informationClassificationNames);
		addOption(".sort1",object.informationSortNames);
		$("#valProfile").html(object.informationProfile);//简介
		$("#valStandard").html(object.standard);//标准
		$("#valMeasure").html(object.mesure);//措施
		$("#valContent").html(object.informationConternt);//内容
		//显示任务派遣情况
		if(object.flowId>=6){
			$(".taskTable").show();
			getTaskDispatch(id);
		}
//		获取点评记录
		if(object.flowId>=9){
			$("#commentRecord").show();
			getCommentRecord(id);
		}else{
			$("#commentRecord").show();
			getInputCommentRecord(id);
		}
//		//获取评价记录
//		if(object.flowId>=10){
//			$("#evaluationRecord").show();
//			getEvaluationRecord(id);
//		}
//		if(object.flowId>=10){
////			$("#CommentRecordBrowse").show();
//			getCommentBrowseRecord(id);
//			setTimeout(function(){
//				addCommentRecorBrowse(id);
//			},1100)
//		}
		try{
			var appendix=object.appendix.substring(1,object.appendix.length-1);
			
			appendix=appendix.split(",");
			YuXi.appendix.get(appendix);
		}catch(error){
			
		}
	},function(){
	})
}

//function addCommentRecorBrowse(id){
//	var url="addCommentRecorBrowse.do";
//	var infoId={infoId:id};
//	var flag=0;
//	var userId=$(".nav-userInfo").attr("data-userId");
//	var recordId;
//	
//	for(var i=0;i<browseRecord.length;i++){
//		if(browseRecord[i].userId==userId){
//			recordId=browseRecord[i].id;
//			flag=1;
//			break;
//		}
//	}
//
//	
//	if(flag==1){
//		url="modifyCommentRecorBrowse.do";
//		infoId={infoId:id,id:recordId};
//	}else{
//		url="addCommentRecorBrowse.do";
//		infoId={infoId:id};
//	}
//	YuXi.util.get(url,infoId,function(data){
//		if(data.status){
//			
//			
//			
//		}
//	},function(){
//		
//	});
//}

//获取修改信息记录
function getCommentBrowseRecord(id){
	var url="getCommentBrowseByInfoId.do";
	var infoId={infoId:id};
	var object={};
	YuXi.util.get(url,infoId,function(data){
		if(data.status){
			object=data.object;
			browseRecord=object;
			$(".CommentRecordBrowse").html("");
			$(".browse-title").html("点评记录浏览列表("+browseRecord.length+"次)");
			if(object.length>4){
				for(var i=0;i<4;i++){
					var time = YuXi.getTime.get(object[i].browseTime);
					
					var html='<li class="list-group-item" >'+time+" "+object[i].userName+'浏览了点评记录</li>';
					$(".CommentRecordBrowse"). append(html);
				}
				$(".CommentRecordBrowse"). append('<li class="list-group-item text-center"  style="padding:4px 15px;color:#347AB7;" id="moreBrowseRecord">查看更多</li>');
			}else{
				for(var i=0;i<object.length;i++){
					var time = YuXi.getTime.get(object[i].browseTime);
					var html='<li class="list-group-item">'+time+" "+object[i].userName+'浏览了点评记录</li>';
					$(".CommentRecordBrowse").append(html);
				}
			}
			
		}else{
			
		}
	},function(){
		
	});
}
	function allModifyRecord(id){
		var url="getAllModifyRecord.do";
		var infoId={infoId:id};
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				allModifyInfoRecord=data.object;
//				alert(allModifyInfoRecord.length);
				getInfoRecord(id);
			}
		},function(){
			
		});
	}
	//获取信息所有操作记录
	function getInfoRecord(id){
		var url="getOperationByInfoId.do";
		var infoId={infoId:id};
		var object={};
		index=0;
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				index=0;
				object=data.object;
				modifyInfoRecord=object;
				$(".modifyRecord").html("");
				if(object.length>4){
					for(var i=0;i<4;i++){
						var date =(object[i].time)*1;
						date=new Date(date);
						var year =date.getFullYear();
						var month=date.getMonth()+1;
						var day=date.getDate();
						var hours=date.getHours();
						var minure=date.getMinutes();
						var detailtime=year+"年"+month+"月"+day+"日"+hours+"时"+minure+"分";
						if(modifyInfoRecord[i].doType==5){
							
							modifyIsRed(index);
							if(isRed==1){
								var html='<li style="color:red;" class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>'
								$(".modifyRecord"). append(html);
							}else{
								var html='<li class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>'
								$(".modifyRecord"). append(html);	
							}
							
							index++;
						}else{
							var html='<li class="list-group-item">'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>'
							$(".modifyRecord"). append(html);
						}
						
					}
					$(".modifyRecord"). append('<li class="list-group-item text-center"  style="padding:4px 15px;color:#347AB7;" id="moreModifyRecord">查看更多</li>');
				}else{
					index=0;
					for(var i=0;i<object.length;i++){
						var date =(object[i].time)*1;
						date=new Date(date);
						var year =date.getFullYear();
						var month=date.getMonth()+1;
						var day=date.getDate();
						var hours=date.getHours();
						var minure=date.getMinutes();
						var detailtime=year+"年"+month+"月"+day+"日"+hours+"时"+minure+"分";
						if(modifyInfoRecord[i].doType==5){
							modifyIsRed(index);
							if(isRed==1){
								var html='<li style="color:red;" class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>'
								$(".modifyRecord"). append(html);
							}else{
								var html='<li class="list-group-item modifyDetailInfo" data-num='+i+' data-time='+detailtime+' data-id='+modifyInfoRecord[i].id+'>'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>'
								$(".modifyRecord"). append(html);	
							}
							
							index++;
						}else{
							var html='<li class="list-group-item">'+month+"月"+day+"日"+hours+"时"+" "+object[i].name+object[i].doRemark+'</li>';
							$(".modifyRecord").append(html);
						}
						
					}
				}
				
			}else{
				
			}
		},function(){
			
		});
	}
	
	
	function modifyIsRed(i){
		isRed=false;
		if(allModifyInfoRecord.length==1){
			if($.trim($(".reSearchSource").text())!=$.trim(allModifyInfoRecord[1].informationSourceNames)){
				isRed=1;
				return;
			}
			if($.trim($(".sele").text())!=$.trim(allModifyInfoRecord[1].safetyPortNames)){
				isRed=1;
				return;
			}
			if($.trim($(".pes").text())!=$.trim(allModifyInfoRecord[1].informationClassificationNames)){
				isRed=1;
				return;
			}
			if($.trim($(".sort1").text())!=$.trim(allModifyInfoRecord[1].informationSortNames)){
				isRed=1;
				return;
			}
			if($.trim($(".label1").text())!=$.trim(allModifyInfoRecord[1].inputPerSonNames)){
				isRed=1;
				return;
			}
			
			if($.trim($("#valProfile").text())!=$.trim(allModifyInfoRecord[1].informationProfile)){
				isRed=1;
				return;
			}
			if($.trim($("#valContent").text())!=$.trim(allModifyInfoRecord[1].informationConternt)){
				isRed=1;
				return;
			}
			if($.trim($("#valMeasure").text())!=$.trim(allModifyInfoRecord[1].mesure)){
				isRed=1;
				return;
			}
		}else{
			if(i+1>=allModifyInfoRecord.length){
				if($.trim($(".reSearchSource").text())!=$.trim(allModifyInfoRecord[i].informationSourceNames)){
					isRed=1;
					return;
				}
				if($.trim($(".sele").text())!=$.trim(allModifyInfoRecord[i].safetyPortNames)){
					isRed=1;
					return;
				}
				if($.trim($(".pes").text())!=$.trim(allModifyInfoRecord[i].informationClassificationNames)){
					isRed=1;
					return;
				}
				if($.trim($(".sort1").text())!=$.trim(allModifyInfoRecord[i].informationSortNames)){
					isRed=1;
					return;
				}
				if($.trim($(".label1").text())!=$.trim(allModifyInfoRecord[i].inputPerSonNames)){
					isRed=1;
					return;
				}
				
				if($.trim($("#valProfile").text())!=$.trim(allModifyInfoRecord[i].informationProfile)){
					isRed=1;
					return;
				}
				if($.trim($("#valContent").text())!=$.trim(allModifyInfoRecord[i].informationConternt)){
					isRed=1;
					return;
				}
				if($.trim($("#valMeasure").text())!=$.trim(allModifyInfoRecord[i].mesure)){
					isRed=1;
					return;
				}
			}else{
				if($.trim(allModifyInfoRecord[i].informationSourceNames)!=$.trim(allModifyInfoRecord[i+1].informationSourceNames)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].safetyPortNames)!=$.trim(allModifyInfoRecord[i+1].safetyPortNames)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].informationClassificationNames)!=$.trim(allModifyInfoRecord[i+1].informationClassificationNames)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].informationSortNames)!=$.trim(allModifyInfoRecord[i+1].informationSortNames)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].inputPerSonNames)!=$.trim(allModifyInfoRecord[i+1].inputPerSonNames)){
					isRed=1;
					return;
				}
				
				if($.trim(allModifyInfoRecord[i].informationProfile)!=$.trim(allModifyInfoRecord[i+1].informationProfile)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].informationConternt)!=$.trim(allModifyInfoRecord[i+1].informationConternt)){
					isRed=1;
					return;
				}
				if($.trim(allModifyInfoRecord[i].mesure)!=$.trim(allModifyInfoRecord[i+1].mesure)){
					isRed=1;
					return;
				}
			}
		}
	}
	//获取点评记录
	function getCommentRecord(id){
		var url="getCommentRecordByInfoId.do";
		var infoId={infoId:id};
		var object={};
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				object=data.object;
				commentRecord=object;
				$(".commentRecord").html("");
				$("#commentRecord").show();
				var html='<li class="list-group-item">'+"信息录入和收集质量：<span style='color:blue'>"+object.informationQualityName+'</span></li>'
				$(".commentRecord"). append(html);
				html='<li class="list-group-item">'+"录入和收集点评："+object.content+'</li>'
				$(".commentRecord"). append(html);
				html='<li class="list-group-item">'+"任务完成情况：<span style='color:blue'>"+object.taskCompletionName+'</span></li>'
				$(".commentRecord"). append(html);
				if(object.completeContent==undefined){
					object.completeContent=" ";
				}
				html='<li class="list-group-item">'+"完成情况点评："+object.completeContent+'</li>'
				$(".commentRecord"). append(html);
			}else{
				$("#commentRecord").hide();
			}
		},function(){
			
		});
	}
	//获取点评记录
	function getInputCommentRecord(id){
		var url="getCommentRecordByInfoId.do";
		var infoId={infoId:id};
		var object={};
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				object=data.object;
				commentRecord=object;
				$(".commentRecord").html("");
				$("#commentRecord").show();
				var html='<li class="list-group-item">'+"信息录入和收集质量：<span style='color:blue'>"+object.informationQualityName+'</span></li>'
				$(".commentRecord"). append(html);
				html='<li class="list-group-item">'+"录入和收集点评："+object.content+'</li>'
				$(".commentRecord"). append(html);
			}else{
				$("#commentRecord").hide();
			}
		},function(){
			
		});
	}
	
	
//	function getEvaluationRecord(id){
//		var url="getEvaluationRecordByInfoId.do";
//		var infoId={infoId:id};
//		var object={};
//		YuXi.util.get(url,infoId,function(data){
//			if(data.status){
//				object=data.object;
//				commentRecord=object;
//				$(".evaluationRecord").html("");
//				$("#evaluationRecord").show();
//				var html='<li class="list-group-item">'+"信息评价内容："+object.content+'</li>'
//				$(".evaluationRecord").append(html);
//			}else{
//				
//			}
//		},function(){
//			
//		});
//	} 
	//获取任务派遣记录
	function getTaskDispatch(id){
		var url="getTaskDispatchByInfoId.do";
		var infoId={infoId:id};
		var object={};
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				object=data.object;
				for (var i = 0; i < object.length; i++) {
					var endTime="";
					var taskTime="长期";
					if(object[i].endTime!=0){
						endTime=new Date(object[i].endTime);
						var y=endTime.getFullYear() + '年';
						var m=(endTime.getMonth()+1)+'月';
						var d=endTime.getDate()+'日';
						endTime=y+m+d;
					}
					
					if(object[i].taskTime==3502800000000){
						taskTime="长期";
					}else{
						var time=new Date(object[i].taskTime);
						var y=time.getFullYear() + '年';
						var m=(time.getMonth()+1)+'月';
						var d=time.getDate()+'日';
						taskTime=y+m+d;
					}
					
					if(object[i].remark==undefined){
						object[i].remark="";
					}
					var  taskCompletion ;
					if(object[i].taskCompletion==null||object[i].taskCompletion==undefined){
						taskCompletion="";
					}else{
						taskCompletion=object[i].taskCompletion;
					}
					
					var html = "<tr ><td style='border:none;'>" + object[i].personDispatchName + "</td>" +
					"<td style='border:none;'>" + object[i].perSonLiableName + "</td>" +
					"<td style='border:none;'>" + taskTime + "</td>" +
					"<td style='border:none;'>" + object[i].remark + "</td>" +
					"<td style='border:none;'>" + taskCompletion+ "</td>" +
					"<td style='border:none;'>" +endTime  + "</td>" +
 					"</tr>";
					$("#tablebody").append(html);
				}
			}
		},function(){
			
		});
	}
	function getInformationFlow(id){
		var url="getInformationFlowByInfoId.do";
		var infoId={infoId:id};
		var object={};
		YuXi.util.get(url,infoId,function(data){
			if(data.status){
				object=data.object;
				var flow;
				
				for (var i = 0; i < object.length; i++) {
					if(object[i].lastFlowId==1){
						flow="信息管理";
					}
					if(object[i].lastFlowId==3){
						flow="复核";
					}
					if(object[i].lastFlowId==2){
						flow="初审";
					}
					if(object[i].lastFlowId==4){
						flow="审核";
					}
					
					var time = YuXi.getTime.get(object[i].createTime);
					
					if(object[i].remark==undefined){
						object[i].remark="";
					}
					var html = "<tr ><td style='border:none;'>" + object[i].userName + "</td>" +
					"<td style='border:none;'>" +time  + "</td>" +
					"<td style='border:none;'>" + object[i].operation + "</td>" +
					"<td style='border:none;'>" + object[i].remark + "</td>" +
					"<td style='border:none;'>" +flow  + "</td>" +
 					"</tr>";
					$("#tbody").append(html);
				}
			}
		},function(){
			
		});
	}
	function addOption(className,value){
		var html= value;
		$(className).append(html);
	}

});